﻿<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String basePath = request.getContextPath();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	</head>
	<script language="javascript">
		jQuery(document).ready(
			function(){
				jQuery("#buttonok").bind("click",
					function(){
						var isjoin = jQuery("#isjoin:checked").val();
						if(isjoin == "on"){
							isjoin = 1;
						}else{
							isjoin = 2;
						}
						var isagent = jQuery("#isagent:checked").val();
						if(isagent == "on"){
							isagent = 1;
						}else{
							isagent = 2;
						}
						var suggestagent = jQuery("#suggestagent").val();
						var promise = jQuery("#promise").val();
						var replynote = jQuery("#replynote").val();
						var postData = "is_join="+isjoin+"&is_agent="+isagent+"&suggest_agent="+suggestagent+"&promise="+promise+"&reply_note="+replynote;
						//alert(postData);
						//这里ajax提交
						jQuery.ajax({ 
			                type: "POST", 
			                async:true,
			                url:"<%=request.getContextPath()%>/sourcing/biddingprojlist/invitereply", 
			                data:postData, 
			                dataType:"text",
			                success:function(result){ 
			                	//alert(result);
				                if(result == "success"){
			                    	var url = "<%=request.getContextPath()%>/sourcing/biddingprojlist/projexec?pk_pur_project=${RELEASE_INVITE.pk_pur_project}";
			                    	//alert(url);
			                    	location.href = url;
			                    }else{
			                    	//jQuery("#message").html(result);
			                    }
			                    return;	
		                    }
			            }); 
					}
				);
				jQuery("#buttoncan").bind("click",
					function(){
						hideMe();	
					}
				);
			}
		)
	</script>
	<body class="innerpage">
		<table width="700" border="0" class="poptable" cellpadding="2" cellspacing="0" align="center">
			<tr>
				<td align="right" class="W1 color1" width="20%">
					项目编号：
				</td>
				<td align="left" class="W2 color1" width="25%">
					${RELEASE_INVITE.pur_project_code}
				</td>
				<td align="right" class="W1 color1" width="30%">
					项目名称：
				</td>
				<td align="left" class="W2 color1" width="25%">
					${RELEASE_INVITE.pur_project_name}
				</td>
			</tr>
			<tr>
				<td align="right">
					撤销时间：
				</td>
				<td align="left">
					${RELEASE_INVITE.removetime}
				</td>
				<td align="right">
					采购邀请公告附件：
				</td>
				<td align="left">
					<input type="button" class="btnscs" value="下载" />
				</td>
			</tr>
			<tr>
				<td align="right">
					邀请函内容：
				</td>
				<td colspan="3" align="left">
					<textarea class="textarea" rows="6" readonly>${RELEASE_INVITE.releasetxt}</textarea>
				</td>
			</tr>
			<tr>
				<td colspan="4" class="splittd">
				</td>
			</tr>
			<tr>
				<td align="right">
					<input id="isjoin" name="isjoin" type="checkbox" <c:if test="${INVITE_REPLY.is_join == 1}">checked</c:if> />
					是否参与
				</td>
				<td align="right">
					<input id="isagent" name="isagent" type="checkbox" <c:if test="${INVITE_REPLY.is_agent == 1}">checked</c:if> />
					是否代理
				</td>
				<td align="right">
					代理商名称：
				</td>
				<td align="left">
					<input type="text" class="textinput" id="suggestagent" name="suggestagent" value="${INVITE_REPLY.suggest_agent}" />
				</td>
			</tr>
			<tr>
				<td align="right">
					承诺说明：
				</td>
				<td align="left" colspan="3">
					<textarea id="promise" name="promise" class="textarea" rows="4">${INVITE_REPLY.promise}</textarea>
				</td>
			</tr>
			<tr>
				<td align="right">
					应答说明：
				</td>
				<td align="left">
					<textarea id="replynote" name="replynote" class="textarea" rows="4">${INVITE_REPLY.reply_note}</textarea>
				</td>
				<td align="right">
					应答公告上传附件：
				</td>
				<td align="left">
					<input type="button" class="btnscs" value="上传" />
				</td>
			</tr>
			<tr>
				<td align="right">
					提交人：
				</td>
				<td align="left">
					${INVITE_REPLY.commit_psn_name}
				</td>
				<td align="right">
					提交时间：
				</td>
				<td align="left">
					${INVITE_REPLY.commit_time}
				</td>
			</tr>
		</table>
		<div class="margin20">
			<div id="message" class="mycolor">
				<c:out value="${ERROR_MESSAGE}" />
			</div>
		</div>
		<div class="cbuttonrow">
			<p align="center">
				<input type="button" id="buttonok" class="buttonok" value="确认" />
				<input type="button" id="buttoncan" class="buttoncan" value="取消"  />
			</p>
		</div>
	</body>
</html>